Service providers (e.g., wireless, cellular, etc.) and device manufacturers are continually challenged to deliver value and convenience to consumers by, for example, providing compelling network services. Important differentiators in the industry are application and network services as well as capabilities to support and scale these services. In particular, these applications and services can include accessing and managing data utilized by network services. These services entail managing a tremendous amount of user data, such as terabytes of data available through online stores for books, audio and video or online storage of personal emails, pictures, audio and video for a large number of subscribers. To search these large data holdings, indices are generated that associate data objects like books and images and files with searchable fields, such as dates and subject matter. The indices themselves can become quite large. Some services store such indices distributed among many network nodes so that each node maintains an index of a size that can be searched in a reasonably short time. However the indices are partitioned, some searches still involve most or all partitions of the index, and can consume large amounts of computational power and network bandwidth, with inherent delays in responding to individual search requests.
Some Example Embodiments
Therefore, there is a need for an approach for enhanced processing of search requests directed to a partitioned index, which does not suffer all the disadvantages of prior art approaches.
According to one embodiment, a method comprises receiving a current request for a search of an index. The index is partitioned across a plurality of nodes in communication. The method also comprises determining whether the request is deterministic. The method further comprises determining a number of responses to request from at least one of the plurality of nodes based on whether the request is deterministic. In some embodiments, the request is deterministic if no more than a predetermined number of sets of index entries at least substantively satisfies the request, for example if only one set of index entries substantively satisfies the request.
According to another embodiment, a method comprises facilitating access to at least one interface configured to allow access to at least one service. The at least one service is configured to perform at least receiving a request for a search of an index. The service is further configured to determine whether the request is deterministic. The service is further configured to determine a number of responses to request from at least one of the plurality of nodes based on whether the request is deterministic.
According to another embodiment, an apparatus comprises at least one processor, and at least one memory including computer program code, the at least one memory and the computer program code configured to, with the at least one processor, cause, at least in part, the apparatus to receive a request for a search of an index, wherein the index is partitioned across a plurality of nodes in communication. The apparatus is also caused to determine whether the request is deterministic. The apparatus is further caused to determine a number of responses to request from at least one of the plurality of nodes based on whether the request is deterministic.
According to another embodiment, a computer-readable storage medium carries one or more sequences of one or more instructions which, when executed by one or more processors, cause, at least in part, an apparatus to receive a request for a search of an index, wherein the index is partitioned across a plurality of nodes in communication. The apparatus is also caused to determine whether the request is deterministic. The apparatus is further caused to determine a number of responses to request from at least one of the plurality of nodes based on whether the request is deterministic.
According to another embodiment, an apparatus comprises means for performing the steps of one of the above methods.
According to another embodiment, a computer program product includes one or more sequences of one or more instructions which, when executed by one or more processors, cause an apparatus to at least perform the steps of one of the above methods.
Still other aspects, features, and advantages of the invention are readily apparent from the following detailed description, simply by illustrating a number of particular embodiments and implementations, including the best mode contemplated for carrying out the invention. The invention is also capable of other and different embodiments, and its several details can be modified in various obvious respects, all without departing from the spirit and scope of the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.